#identify if jpg > 640x480,if xsize > 640x (bigjpg),resize to 640x480 pipeline
#identify -ping $1 | sed -e "s/.*JPEG //g" | sed -e "s/x.*//g"

xsize=`identify -ping $1 | sed -e "s/.*JPEG //g" | sed -e "s/x.*//g"`
ysize=`identify -ping $1 | sed -e "s/.*JPEG [0-9]*x//g" | sed -e "s/\ [0-9]*x.*//g"`

if [ $ysize -ge 650 -o $xsize -ge 650 ] #OR
then
    ~/hnol/identify_jpg_hori_vert_resize.sh $1 ~/hnol/hori/ ~/hnol/vert/ 
fi
